﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace IronLua.Metadata
{
    public sealed class Chunk
    {
        internal Chunk()
        {
            
        }

        public string           Name { get; internal set; }
        public string           Signature { get; internal set; }
        public byte             Version { get; internal set; }
        public byte             Format { get; internal set; }
        public Endianness       Endianness { get; internal set; }
        public uint             IntegerSize { get; internal set; }
        public uint             PtrSize { get; internal set; }
        public uint             InstructionSize { get; internal set; }
        public uint             NumberSize { get; internal set; }
        public NumberType       NumberType { get; internal set; }
        public Prototype        TopFunction { get; internal set; }
        public IList<Prototype> Prototypes { get; internal set; }

        public override string ToString()
        {
            return "{0} (chunk)".FormatWith(this.Name);
        }
    }
}
